Ext.define('Jwawa.framework.JwawaProxy', {
    extend: 'Ext.data.proxy.Ajax',
    alias: 'proxy.jwawaProxy',
    actionMethods: {create: 'POST', read: 'POST', update: 'POST', destroy: 'POST'},

    doRequest: function(operation, callback, scope) {
        var writer  = this.getWriter(),
            request = this.buildRequest(operation, callback, scope);

        if (operation.allowWrite()) {
            request = writer.write(request);
        }

        var jsonData = Ext.apply(this.jsonData|| {}, request.params);

        Ext.apply(request, {
            headers       : this.headers,
            timeout       : this.timeout,
            jsonData      : jsonData,
            scope         : this,
            callback      : this.createRequestCallback(request, operation, callback, scope),
            method        : this.getMethod(request),
            disableCaching: false // explicitly set it to false, ServerProxy handles caching
        });

        Jwawa.framework.JwawaConnection.request(request);

        return request;
    }
});
